 <style>
.ttl{width:120px;text-align:right;display-inline:block;vertical-align: top;}
.pop_cont_input{line-height:30px;} .pop_cont_input input{pading:0px 5px;} .pop_cont_input select{height:28px;}

.pop_cont ul li{width:90%;}
 </style>
 <div class="pop_cont" style="width:800px;left:30%;">
 <input type="hidden" value="<?php echo $id; ?>" id="editId" />
       <!--title-->
       <h3><?php echo $title;?><span class="falseBtn" style="color:red;float:right;font-size:18px;cursor:pointer;">X</span></h3>
       <!--content-->
       <div class="pop_cont_input">
        <ul>
        
          <li>
           <span class="ttl">报修人</span>
           <span><?php echo $LoginUserInfo['UserInfo']['nickname']; ?></span>
          
         </li>
         <li>
           <span class="ttl">联系电话</span>
            <input type="text" name="phone" id="phone" value="<?php echo $LoginUserInfo['UserInfo']['phone'];?>" placeholder="联系电话" class="textbox" style="padding:0px;" />
          
         </li>
          <li>
           <span class="ttl">报修部门</span>
           <span><?php 
               if($LoginUserInfo['SecondDep'])
			   {
					echo $LoginUserInfo['SecondDep']['depname'];		
               }else if($LoginUserInfo['FirstDep'])
			   {
					echo $LoginUserInfo['FirstDep']['depname'];		
               }
           ?></span>
          
         </li>
         <li>
           <span class="ttl">报修部门办公室号</span>
            <input type="text" name="office_no" id="office_no" value="" placeholder="报修部门办公室号" class="textbox" style="padding:0px;" />
          
         </li>
                   
         <!--  <li>
           <span class="ttl">类型</span>
           <input type="radio" name="bxtype"  class="bxtype" value="1" checked />技术支持
           <input type="radio" name="bxtype"  class="bxtype" value="0" />硬件维修
         </li>-->
         
         <li>
           <span class="ttl">维修种类</span>
           <select name="tcfg" id="tcfg">
           
              <?php
              
              foreach($tcfgLists as $key=>$val)
			  {
            ?>
            <option value="<?php echo $val['id']; ?>||<?php echo $val['name']; ?>"><?php echo $val['name']; ?></option>
            <?php
			  }
               ?>
           </select>
         </li>
         
    
         <li id="yjshow" style="display:none;">
           <span class="ttl">硬件</span>
           <select name="s_type" id="s_type">
           		<option value="">--选择--</option>
           		<option value="1">我的</option>
           		<option value="2">部门的</option>
           </select>
           
            <select name="s_val" id="s_val">
           		<option value="">--选择--</option>
           		
           </select>
          
         </li>
          <li>
           <span class="ttl">描述</span>
           <textarea id="conts" name="conts" style="width:70%;height:120px;"></textarea>
          
         </li>
         
         <li>
           <span class="ttl">申报时间</span>
           <span><?php echo date("Y-m-d"); ?></span>
          
         </li>
        
        </ul>
       </div>
      
       <!--bottom:operate->button-->
       <div class="btm_btn">
        <input type="button" value="确认" class="input_btn trueBtn"/>
        <input type="button" value="关闭" class="input_btn falseBtn"/>
       </div>
      </div>
      
      <script>
      $(function(){
    	  $(".network_type").hide();
     	  $("#e-network").change(function(){
     		  var ty =$(this).val();
     		  if(ty=='0')
     		  {
     			 $(".network_type").hide(); 
     		  }else
     		  {
     			 $(".network_type").show();
     		  }
     	  });
     	/*  $(".bxtype").change(function(){
     		  var val=$(this).val();
     		  if(val=='0')
     		  {
     			  $("#yjshow").show();
     		  }else
     		  {
     			 $("#yjshow").hide();
     		  }
     	  });*/
	       $(".trueBtn").unbind().bind("click",function(){
			 
	    	var that =this;
   		    var url="/admin/my/addDataJob";
   		 	var conts=$("#conts").val();
   
   		    //var bxtype=$('input[name="bxtype"]:checked').val();
   		    var bxtype=1;
   		 	var s_type=$("#s_type").val();
   		 	var s_val=$("#s_val").val();
   		 	var office_no=$("#office_no").val();
   		 	var phone=$("#phone").val();
   		 	var tcfg=$("#tcfg").val();
		    
   		   if(phone=="")
	 		{
	 		     ErrTiShi("请填写联系电话");return false;
	 		}
   		 if(office_no=="")
	 		{
	 		     ErrTiShi("请填写报修部门办公室号");return false;
	 		}
   		 	if(bxtype=='0')
   		 	{
   		 		if(s_val=="")
   		 		{
   		 		     ErrTiShi("请选择需要维修的硬件");return false;
   		 		}
   		 	}
		   
   		   
		    if(conts=="")
		    {
		    	ErrTiShi("任务详情不能够为空");return false;
		    }
		    var param={
		    	conts:conts,
		    	bxtype:bxtype,
		    	s_type:s_type,
		    	s_val:s_val,
		    	office_no:office_no,
		    	phone:phone,
		    	tcfg:tcfg,
				sys_opt:'addData'//后台判断编辑操作
		    };
		   
			 AjaxRequest(url,param,function(data){
  			   if(data.err==0)
  			   {
  				 
  				   var isContinut=0;
  				   cofirmsss_tishi(1,'操作成功',function(id){
  					 
					   isContinut=1;
					   myResearch();
					 $(".pop_bg").fadeIn();
				   },function(){
					 $(".pop_bg").fadeOut();
					 	
				   		myResearch();
				   });
  				  
  			   }
  			   else
  			   {
  				   ErrTiShi(data.msg);
  			   }
  		   	});
			 
		  });
		   //弹出：取消或关闭按钮
		   $(".falseBtn").unbind().bind("click",function(){
			   myResearch();
			 $(".pop_bg").fadeOut();
		   });
		   
		   

		   $("#s_type").change(function(){
		  	   
		  	   var url="/admin/my/selectMyOrdep";
		  		    var ty=$(this).val();
		  		    if(ty=="")
		  		    {
		  		    	$("#s_val").html('<option value="">--选择--</option>');
		  		    	return true;
		  		    }
		  		    var param={
		  				   ty:ty
		  		    };
		  	   AjaxRequest(url,param,function(data){
		  		   if(data.err==0)
		  		   {
		  			   var html='<option value="">--选择--</option>';
		  			   $.each(data.data,function(i,v){
		  				 html +='<option value="'+v.id+'">'+v.dvename+'</option>'
		  			   })
		  			   $("#s_val").html(html);
		  		   }
		  		   else
		  		   {
		  			   ErrTiShi("操作失败");
		  		   }
		  	   	});
		  	   
		   });
		   
		   
 $(".secondTypeRS").change(function(){
		  	   
	 getCodes();
 });
		   
		   
		  /** $("#autoDve").click(function(){
		  		
		  		     if(this.checked)
		  			 {
		  		    	$("#e-dveid").val("");
		  			    $("#e-dveid").attr("disabled", true);
		  			 }
		  		    else
		  			 {
		  		    
		  			   $("#e-dveid").attr("disabled", false);
		  			 }
		  	   });
		  	 */
		  	   
		  	   // $("#e-dveid").val("");
	  			//$("#e-dveid").attr("disabled", true);
		   
			$("#all").click(function(){   
		    	if(this.checked){   
		        	$(".checkBoxInput").attr("checked", true);  
		        	$(".checkBoxInput").prop("checked", true);  
		    	}else{   
					$(".checkBoxInput").attr("checked", false);
					$(".checkBoxInput").prop("checked", false);
		    	}   
		    	var se=getAllSelectItem();
		    	//console.log(se);
		 	}); 
			   
 	});
      function getCodes()
      {
    	   var url="/admin/devlist/generaCode";
		    var id=$("#e-type").val();
		   
		    var param={
				   id:id
				   
		    };
		   
	   AjaxRequest(url,param,function(data){
		   if(data.err==0)
		   {
			   
			   $("#e-dveid").val(data.data);
		   }
		   else
		   {
			   ErrTiShi("操作失败");
		   }
	   	});
	   
      }
      </script>